package com.blog.wu.myblog.dao;

import com.blog.wu.myblog.base.CrudDao;
import com.blog.wu.myblog.entity.Role;
import com.blog.wu.myblog.entity.UserInfo;

import java.util.List;

public interface RoleMapper extends CrudDao<Role> {
    /**
     * 根据用户名查询角色
     *
     * @param userInfo
     * @return
     * @Date 2018/11/5 5:33 PM
     * @Author wuyanshen
     */
    List<Role> findRoles(UserInfo userInfo);

    int insertPermissionRole(Role role);

    int deleteRole(Role role);

    int deleteRolePermission(Role role);

    int countUserRole(Role role);
}
